<?php
session_start();
header("Content-Type:text/html;charset=utf-8");
date_default_timezone_set("Etc/GMT-8"); //设置中国时区

require './conf/website.conf.php';
require $website['path']['lib'] . '/func.php';
require $website['path']['lib'] . '/Website.class.php';
require $website['path']['lib'] . '/WebError.class.php';
require $website['path']['lib'] . '/Database.class.php';
require $website['path']['lib'] . '/Template.class.php';
require $website['path']['lib'] . '/Files.class.php';
require $website['path']['lib'] . '/Log.class.php';
require $website['path']['lib'] . '/Unity.class.php';

//网站开始
$main = new Website($website);

$main->website['class']['tpl']
	->assign('website', $website)
	->assign('css', 0)
	->assign('jss', 0)
	->assign('user', fn_session('user'))
	->custom('fn_url', 'fn_url')
	->custom('fn_format_time', 'fn_format_time')
	->custom('act', fn_get('act', fn_post('act')))
	->custom('fn_substr', 'fn_substr');

$main->start();
